package com.saturn.action.sldb.reconciliation;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.saturn.app.web.IAction;
import com.saturn.app.web.IView;
import com.saturn.app.web.view.JspView;
import com.saturn.sldb.Reconciliation;

public class QueryReconciliationAction implements IAction{
	@Override
	public IView execute(HttpServletRequest request,
			HttpServletResponse response) {
		String id = request.getParameter("id");
		String view = request.getParameter("view");
		
		Reconciliation vo = Reconciliation.get(id);
			if("ok".equals(view)){
				return new JspView("/app/sldb/discussion/apply/view.jsp");
			} else{
				request.setAttribute("reconciliation", vo);
				return new JspView("/app/sldb/total/tmp/edit.jsp");
			}
		}
	@Override
	public String requestMapping() {
		return "/app/sldb/reconciliation/query.action";
	}
}
